Fix: LAMMPS to Gromacs Conversion Issues #396
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implementation of opls dihedrals and cvff improper
Added few lines of code to correctly implement the conversion; which otherwise was throwing errors.
Input files:
files can be found inside zip:
lammps_input_files_and_correct_conversions.zip:
Command:
python InterMol/intermol/convert.py --lmp_in in.lammps --gromacs
Now lets say we remove the dihedral information from the LAMMPS input script and data file (which were resulting errors)
New Input files:
files can be found inside zip: modified_lammps_input_files_and_incorrect_conversion_in_harmonic_bond_coefficients.zip:
Command:
python InterMol/intermol/convert.py --lmp_in in.lammps_modified_ --gromacs
Although this does the conversion, but the harmonic bond coefficient (k: force constant) is wrong. It is supposed to be multiplied by 2, which the current version is not doing because of a bug in the implementation.
Comparisons are made between in_converted.top (that is generated by intermol) and UNK_8742A6.itp.
The files UNK_8742A6.itp and UNK_8742A6.lmp were both obtained from Ligpargen server for a single Ethanol molecule.
Harmonic style bond coefficients
In
intermol/lammps/lammps_parser.py
, line number 92 and 95, the comparison was between incorrect types.As a result the
canonical_force_scale
was never never multiplied during the conversion.This was however correctly done in the case of angle coefficient conversions. I have followed similar implementation style to correct the bond part now.
Also implemented the parsing and conversion of OPLS dihedral and cvff impropers.
The correct conversions and their comparison can be found in the zip: lammps_input_files_and_correct_conversions.zip
The correct conversion results are provided in the same zip, which can be compared with UNK_8742A6.itp
Request maintainers to please have a look into the attached zip files and the modifications that are done here.
Thanks,
Jeet
lammps_input_files_and_correct_conversions.zip
modified_lammps_input_files_and_incorrect_conversion_in_harmonic_bond_coefficients.zip
ligpargen_files_Ethanol.zip